import Vue from 'vue';
import VueRouter from 'vue-router';

// 组件模块
import Goods from './components/goods/Goods.vue';
import Ratings from './components/ratings/Ratings.vue';
import Seller from './components/seller/Seller.vue';

// 通过 Vue.use() 明确地安装路由功能
Vue.use(VueRouter);

export default new VueRouter({
    routes: [{
        path: '/',
        name: 'index',
        redirect: '/goods'
    },{
        path: '/goods',
        name: 'goods',
        component: Goods
    }, {
        path: '/ratings',
        name: 'ratings',
        component: Ratings
    }, {
        path: '/seller',
        name: 'seller',
        component: Seller
    }]
})